<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>My JSP 'register.jsp' starting page</title>
    <script type="text/javascript" src="js/plugin/jquerystep/jquery.steps.js"></script>
	<script type="text/javascript">
		$(function(){
			 $('#registerForm').bootstrapValidator({
			        message: 'This value is not valid',
			        feedbackIcons: {
			            valid: 'glyphicon glyphicon-ok',
			            invalid: 'glyphicon glyphicon-remove',
			            validating: 'glyphicon glyphicon-refresh'
			        },
			        trigger:  'blur',
			        fields: {
			        	loginId: {
			                validators: {
			                	notEmpty: {
			                        message: 'The file is required and cannot be empty'
			                    }
			                }
			            },
			            password: {
			                validators: {
			                	notEmpty: {
			                        message: 'The file is required and cannot be empty'
			                    }
			                }
			            }
			        }
			    });
			$("#submit").on("click",function(){
				/* var loginFormObject = $("#registerForm").serializeJSON();
				 $.ajax({
				url: "ajax/register.do",
				type:"post",
				data:loginFormObject,
				contentType : 'application/json',
				dataType: "json",
				success:	function(result){  
					debugger;
					if (result.status){
						alert(result.data);
					}
				}
			});   */
				
				$("#registerForm").ajaxSubmit(
				 			{
									url: "ajax/register.do",
									type:"post",
									dataType: "json",
									contentType : 'application/json',
									isFormObject:true,
									success:	function(result){  
										
				 						if(result.data){
				 							//location.href = "index.do";
				 						}
				 						
									}
							}
				);  
			});
			$("#wizard").steps();
		});

	</script>
  </head>
  
  <body>
	  <!-- <div style="width: 300px;">
	  	<form id="registerForm" action="ajax/register.do"  method="post" >
			<div class="form-group">
				<label >用户名:</label> <input type="text" class="form-control"  name="loginId" placeholder="Email" >
			</div>
			<div class="form-group">
				<label >密码:</label> <input type="password" class="form-control" name="password" placeholder="Password">
			</div>
		</form>
		<button type="button" id="submit">submit</button> 
	  </div> -->
	  <div id="wizard">
	    <h1>First Step</h1>
	    <div>First Content</div>
	 
	    <h1>Second Step</h1>
	    <div>Second Content</div>
      </div>
  </body>
</html>
